From: Richard M. Stallman Date: Tue, 9 Mar 1993 21:17:46 +0000 (+0000) Subject: (map-y-or-n-p): Handle `quit' as answer. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96978 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=81eb8fcd8dc8ac7692ec125014f4ec2fe14d5f25;p=emacs.git (map-y-or-n-p): Handle `quit' as answer. --- diff --git a/lisp/map-ynp.el b/lisp/map-ynp.el index e79e47fa664..c3cce3abc07 100644 --- a/lisp/map-ynp.el +++ b/lisp/map-ynp.el @@ -111,6 +111,7 @@ Returns the number of actions taken." (setq prompt (funcall prompter elt)) (if (stringp prompt) (progn + (setq quit-flag nil) ;; Prompt the user about this object. (let ((cursor-in-echo-area t)) (message "%s(y, n, !, ., q, %sor %s) " @@ -132,6 +133,11 @@ Returns the number of actions taken." (funcall actor elt) (setq actions (1+ actions) next (function (lambda () nil)))) + ((eq def 'quit) + (setq quit-flag t) + (setq next (` (lambda () + (setq next '(, next)) + '(, elt))))) ((eq def 'automatic) ;; Act on this and all following objects. (if (eval (funcall prompter elt))